package com.worldwizards.smut.serialization;

import java.io.IOException;
import java.util.List;

public class SerializedArrayRecord extends ParseObject{
	SerializedClassRecord _cd;
	List[] _valuesList;
	
	public SerializedArrayRecord(SerializedObjectRoot root, BinaryParser parser, int newHandle,
			SerializedClassRecord cd, int arraySize) throws IOException, SerializationParsingException {
		super(newHandle);
		_cd = cd;
		_valuesList = new List[arraySize];
		for(int i=0;i<arraySize;i++){
			_valuesList[i] = _cd.parseValues(root,parser);
		}
	}

	@Override
	protected void dumpDetails(String prefix) {
		System.out.println(prefix+"Array of "+_cd.getClassName());
		//for (ValueRecord value : _valuesList ){
		//	value.dump(prefix+"   ")
		//}
		// TODO: Dont think this handles values quite right
	}

}
